const homePageTab = {
  title: '首页',
  name: 'homePage'
}
export default {
  namespaced: true,
  state: {
    isCollapse: false,
    tabnavBox: [homePageTab],
    rightNav: {}
  },
  mutations: {
    /**
     * 添加标签
     */
    ADDTAB (state, args) {
      console.log('args:', args)
      state.isActive = args.name
      for (let i = 0; i < state.tabnavBox.length; i++) {
        if (state.tabnavBox[i].name === args.name) {
          return false
        }
      }
      state.tabnavBox.push({
        title: args.meta.title,
        name: args.name,
        query: args.query
      })
      if (state.tabnavBox.length > 8) {
        state.tabnavBox.splice(1, 1)
      }
    },
    /**
     * 移除标签
     */
    REMOVETAB (state, args) {

    },
    /**
     * 移除其他的标签
     */
    REMOVEOTHERTAB (state, args) {

    },
    /**
     * 打开菜单
     */
    OEPNMENU (state, args) {

    }
  }
}